package org.osoftware.mumi.dao.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;


/**
 * The Class Patient.
 */
@Entity
@Table(name="patient")
public class Patient extends Person{

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 77104227933503249L;
	
	/** The patient prepaids. */
	@OneToMany(cascade = CascadeType.ALL)
    @JoinColumn(name = "patient_id", updatable = false, insertable = false, nullable=false)
	private List<PatientPrepaid> prepaids;
	
	/** The attention time groups. */
	@OneToMany(cascade = CascadeType.ALL)
    @JoinColumn(name = "patient_id", updatable = false, insertable = false, nullable=false)
	private List<AttentionTimeGroup> attentionTimeGroups;
	
	
	/**
	 * Gets the prepaids.
	 *
	 * @return the prepaids
	 */
	public List<PatientPrepaid> getPrepaids() {
		return prepaids;
	}

	/**
	 * Sets the prepaids.
	 *
	 * @param prepaids the new prepaids
	 */
	public void setPrepaids(List<PatientPrepaid> prepaids) {
		this.prepaids = prepaids;
	}

	/**
	 * Gets the attention time groups.
	 *
	 * @return the attention time groups
	 */
	public List<AttentionTimeGroup> getAttentionTimeGroups() {
		return attentionTimeGroups;
	}

	/**
	 * Sets the attention time groups.
	 *
	 * @param attentionTimeGroups the new attention time groups
	 */
	public void setAttentionTimeGroups(List<AttentionTimeGroup> attentionTimeGroups) {
		this.attentionTimeGroups = attentionTimeGroups;
	}

	/* (non-Javadoc)
	 * @see org.osoftware.mumi.dao.model.Person#toString()
	 */
	@Override
	public String toString() {
		return "Patient [patientPrepaids=" + prepaids + ", toString()="
				+ super.toString() + "]";
	}
}
